//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml
{
    public class TextBox: ShapeElement
    {
        internal const string xmlName = "textbox";
        internal override void ReadXmlCore(ReadContext context)
        {
            using (var c = context.Read(VmlConstants.VmlNamespace + xmlName))
            {
                Id = c.GetOptionalString("id");
                Style = c.GetOptionalString("style");
                Inset = c.GetOptionalString("inset");
                SingleClick = c.GetOptionalString(VmlConstants.OfficeNamespace + "singleclick");
                InsetMode = c.GetOptionalString(VmlConstants.OfficeNamespace + "insetmode");
                if (c.ReaderLocalName != null)
                    extension = UnknownElementHelper.Read(c);
            }
        }

        internal override void WriteXmlCore(WriteContext context)
        {
            using (WriteContext c = context.Write(VmlConstants.VmlNamespace + xmlName))
            {
                c.SetOptionalString("id", Id);
                c.SetOptionalString("style", Style);
                c.SetOptionalString("inset", Inset);
                c.SetOptionalString(VmlConstants.OfficeNamespace + "singleclick", SingleClick);
                c.SetOptionalString(VmlConstants.OfficeNamespace + "insetmode", InsetMode);
                c.WriteOptionalElement(extension);
            }
        }
        IOfficeXmlSerializable extension;

        private string _id;

        public string Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private string _style;

        public string Style
        {
            get { return _style; }
            set { _style = value; }
        }
        private string _inset;

        public string Inset
        {
            get { return _inset; }
            set { _inset = value; }
        }
        private string _singleclick;

        public string SingleClick
        {
            get { return _singleclick; }
            set { _singleclick = value; }
        }
        private string _insetmode;

        public string InsetMode
        {
            get { return _insetmode; }
            set { _insetmode = value; }
        }
	
	
	
	
	
    }
}
